//
//  CommunityModel.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/5/23.
//

#import "CommunityModel.h"
#import "CommonUtil.h"

@implementation CommunityModel






-(CGFloat)cellHeight{
    
    CGFloat h = AD(15+40+10+20);
    
    CGFloat contentH = AD(20);
    if (self.content.length > 0) {
        
        UIFont *font = [UIFont systemFontOfSize:AD(11)];
        CGFloat height = [CommonUtil countHeight:self.content font:font width:SCREEN_WIDTH-AD(40)];
        contentH = height;
    }
    h = h + AD(5) + contentH;
    
    if (self.imageCount > 0) {
        CGFloat margin = AD(10);
        CGFloat w = (SCREEN_WIDTH - (margin * 6))/3;
        h = h + AD(10) + w;
    }
    // toolbar
    h = AD(20) + h + AD(50) + AD(20);
    return h;;
}

@end
